package cn.aiyuan.controller;

import cn.aiyuan.domain.Metric;
import cn.aiyuan.service.CacheTestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author wangyuan
 * @date 2021/7/16
 */
@RestController
@RequestMapping("/cache")
public class CacheTestController {

    @Resource
    private CacheTestService cacheTestService;

    @GetMapping
    public List<Metric> test(){
        return cacheTestService.getMetric();
    }
}
